import request from '@/utils/request'

//导入生命线工程数据shp文件
export function uploadShp (data) {
  return request({
    url: '/domeFacilities/parseShp',
    method: 'post',
    data: data
  })
}

//导入历史震害信息数据excel文件
export function uploadExcel (data) {
  return request({
    url: '/domeFacilities/importMajorProjects',
    method: 'post',
    data: data
  })
}

//分页查询
export function queryByPage(params){
  return request({
    url: '/lifeline/page',
    method: 'get',
    params: params
  })
}

//详情页
export function findById(id,type){
  let params = {
    id:id,
    type:type
  };
  return request({
    url: '/lifeline/findById',
    method: 'get',
    params: params
  })
}

//修改数据
export function updateById (data) {
  //map,type
  return request({
    url: '/heDamage/updateById',
    method: 'post',
    data: data
  })
}

//删除数据
export function deleteByIds (data) {
  //map,type
  return request({
    url: '/heDamage/deleteByIds',
    method: 'get',
    params: data
  })
}
//导入查询重复数据
export function repeatData (data) {
  return request({
    url: '/lifelineEngineering/getRepeatData',
    method: 'post',
    data: data,
  })
}
// 重大工程查询全部数据（地图展示
export function getByVersionId(params){
  return request({
    url: '/heDamage/getByVersionId',
    method: 'get',
    params: params
  })
}